#! /bin/bash
## gwpause.sh
## Simple pause implementation ( Press any key to continue )
##
## rev_06-MARCH-2012::[gsh]
## todo: design sh compatible pause functionality
##

. sh/gwcolordef.sh

PERIOD_LINE="................................................................................";
CURSOR_UP="\e[1A";
CURSOR_RIGHT="\e[1C";

echo -en "$GW_TEXT_TEAL";

for (( i=0; i<3; i++ )); do
	echo -e "$PERIOD_LINE";
done

for (( i=0; i<3; i++ )); do
	echo -en "$CURSOR_UP";
done

echo -en "$GW_TEXT_RED";
echo -en ">>> ";
echo -en "$GW_TEXT_YELLOW";
echo -en "--------";
echo -en "$GW_TEXT_RED";
echo -e  " <<<";
echo -en ">>>  ";
echo -en "$GW_TEXT_RED_HI";
echo -en "PAUSED";
echo -en "$GW_TEXT_RED";
echo -e  "  <<<";
echo -en ">>> ";
echo -en "$GW_TEXT_YELLOW";
echo -en "--------";
echo -en "$GW_TEXT_RED";
echo -en  " <<<";

echo -en "$CURSOR_UP";

echo -en "$CURSOR_RIGHT";
echo -en "$CURSOR_RIGHT";

#resume standard coloring mode
echo -en $GW_TEXT_NORMAL;
echo -en " Press any key to continue... ";

read -n 1 -s;

echo -e "\n";

#return to OS
exit;

